import { showTitle } from '@/libs/util'
export default {
  components: {},
  methods: {
    showTitle(item) {
      return showTitle(item, this)
    },
    showChildren(item) {
      return (
        item.children &&
        (item.children.length > 1 || (item.meta && item.meta.showAlways)) &&
        item.children[0].type == 1 //为按钮级
      )
    },
    getNameOrHref(item, children0) {
      return item.href
        ? item.href
        : children0
        ? item.children[0].name
        : item.name
    }
  }
}
